import React,{FC,useState} from 'react';

const Detail:FC = function (){
    let [list,setList] = useState(['html','css','javascript']);

    const sort = () => {
        setList(['css','html','javascript'])
    }

    return <div>
        <ul>
            {list.map((item,index) => <li key={item}>
                <input type="checkbox"/>
                <span>{item}</span>
            </li>)}
        </ul>

        <button onClick={sort}>扰乱</button>
    </div>
}


export default Detail